<div role="tabpanel" class="tab-pane config-section" id="theme">
	<div class="modal fade" role="document" id="theme-settings-modal">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<h5 class="modal-title">主题设置</h5>
				</div>
				<div class="modal-body">
				{% include "config.html" ignore missing %}
				</div>
			</div>
		</div>
	</div>

	<form method="POST" autocomplete="off" class="w-100">
		<div class="form-group">
			<label for="ctf_theme">
				主题
				<small class="form-text text-muted">
					切换主题
				</small>
			</label>
			<select class="form-control custom-select" id="ctf_theme" name="ctf_theme">
				<option>{{ ctf_theme }}</option>
				{% for theme in themes %}
					<option>{{ theme }}</option>
				{% endfor %}
			</select>
		</div>

		<div class="form-group">
			<label>
				主题颜色
				<small class="form-text text-muted">
					需要主题支持才能控制主题颜色.
				</small>
			</label>
			<div class="d-inline-block">
				<input type="color" id="config-color-picker">
				<button type="button" class="btn-sm btn-primary" id="config-color-update">更新CSS</button>
			</div>
		</div>

		<div class="form-group">
			<label>
				主题标题
				<small class="form-text text-muted">
					在发布的页面上，主题标题插在 <code>&lt;/head&gt;</code> 标签之前.
					需要主题支持.
				</small>
			</label>
			<textarea class="form-control" id="theme-header" name="theme_header" rows="7">{{ theme_header or "" }}</textarea>
		</div>

		<div class="form-group">
			<label>
				主题页脚
				<small class="form-text text-muted">
					在发布的页面上，主题页脚插在 <code>&lt;/body&gt;</code> 标签之前.
					需要主题支持.
				</small>
			</label>
			<textarea class="form-control" id="theme-footer" name="theme_footer" rows="7">{{ theme_footer or "" }}</textarea>
		</div>

		<div class="form-group">
			<label for="ctf_theme">
				主题设置
			</label>
			<div class="d-block pb-2">
				<button type="button" class="btn-sm btn-primary" id="theme-settings-button">
					设置编辑器
				</button>
			</div>
			<textarea class="form-control" id="theme-settings" name="theme_settings" rows="7">{{ theme_settings or "" }}</textarea>
			<small class="form-text text-muted">
				针对主题的特殊设置。
			</small>
		</div>

		<button type="submit" class="btn btn-md btn-primary float-right">更新</button>
	</form>
</div>
